package net.jueb.frameworkDemo.orm.redis.queue.unPersistent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import redis.clients.jedis.Jedis;

public class PubClient {

	protected Logger log=LoggerFactory.getLogger(getClass());
	
	private Jedis jedis;//
	public PubClient(String host,int port){
		jedis = new Jedis(host,port);
	}
	
	public void pub(String channel,String message){
		jedis.publish(channel, message);
	}
	
	public void close(String channel){
		jedis.publish(channel, "quit");
		jedis.del(channel);
	}

}